cssanimatedstyle: Make set_animated_value transfer-full
authorTimm Bäder <mail@baedert.org>
Mon, 19 Aug 2019 09:06:04 +0000 (11:06 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 9 Sep 2019 15:36:24 +0000 (17:36 +0200)
gtk/gtkcssanimatedstyle.c
gtk/gtkcssanimation.c
gtk/gtkcssdynamic.c
gtk/gtkcsstransition.c

index 8f5f1958006886087b927e6082d8ad0d64af5258..ece7037bc67d923fb8db20bf71ddd0cffd4dedae 100644 (file)
@@ -145,7 +145,8 @@ gtk_css_animated_style_set_animated_value (GtkCssAnimatedStyle *style,
 
   if (g_ptr_array_index (style->animated_values, id))
     _gtk_css_value_unref (g_ptr_array_index (style->animated_values, id));
-  g_ptr_array_index (style->animated_values, id) = _gtk_css_value_ref (value);
+
+  g_ptr_array_index (style->animated_values, id) = value;
 
 }
 
index dab839d6a390dc5b9c16727cfdf29d7d91f9a590..445b58d24d9bdbac24482cb17416f719bce9f116 100644 (file)
@@ -113,7 +113,6 @@ gtk_css_animation_apply_values (GtkStyleAnimation    *style_animation,
                                             progress,
                                             gtk_css_animated_style_get_intrinsic_value (style, property_id));
       gtk_css_animated_style_set_animated_value (style, property_id, value);
-      _gtk_css_value_unref (value);
     }
 }
 
index 1d06c1c1fcbc80cf36ed7d6ae9f1d3e09bee8bcc..89243b701cabbb5eb5de9ae8799213b4d123aee8 100644 (file)
@@ -47,7 +47,8 @@ gtk_css_dynamic_apply_values (GtkStyleAnimation    *style_animation,
       dynamic_value = gtk_css_value_get_dynamic_value (value, dynamic->timestamp);
       if (value != dynamic_value)
         gtk_css_animated_style_set_animated_value (style, i, dynamic_value);
-      gtk_css_value_unref (dynamic_value);
+      else
+        gtk_css_value_unref (dynamic_value);
     }
 }
 
index 5f8e1a4fd1c5be51c43b11d3232936fd11ac626c..23478b618b3032575998fa6c4364bcf3c3350354 100644 (file)
@@ -78,7 +78,6 @@ gtk_css_transition_apply_values (GtkStyleAnimation   *style_animation,
     value = _gtk_css_value_ref (end);
 
   gtk_css_animated_style_set_animated_value (style, transition->property, value);
-  _gtk_css_value_unref (value);
 }
 
 static gboolean